package him.serviceimple;

import java.util.List;

import him.dao.NoticeBoardDAO;
import him.daoimple.NoticeBoardDAOImple;
import him.dto.bbs.NoticeDTO;
import him.service.NoticeBoardService;

public class NoticeBoardServiceImple implements NoticeBoardService {
	
	private NoticeBoardDAO noticeBoardDAO;
	private static NoticeBoardServiceImple noticeBoardService;
	
	private NoticeBoardServiceImple(){
		noticeBoardDAO = new NoticeBoardDAOImple();
	}
	public static NoticeBoardServiceImple getInstance(){
		if (noticeBoardService==null) {
			noticeBoardService = new NoticeBoardServiceImple();
		}
		return noticeBoardService;
	}
	@Override
	public List<NoticeDTO> getNoticeTitleFive() {
		return noticeBoardDAO.getNoticeTitleFive();
	}

	@Override
	public List<NoticeDTO> getNoticeTitleList() {
		return noticeBoardDAO.getNoticeTitleList();
	}
	@Override
	public NoticeDTO getNoticeDetail(NoticeDTO dto) {
		return noticeBoardDAO.getNoticeDetail(dto);
	}
	@Override
	public boolean insertNotice(NoticeDTO dto) {
		return noticeBoardDAO.insertNotice(dto);
	}
	@Override
	public boolean updateNotice(NoticeDTO dto) {
		return noticeBoardDAO.updateNotice(dto);
	}

}
